package com.techysky.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;

import org.hibernate.annotations.GenericGenerator;

import lombok.Data;
import lombok.EqualsAndHashCode;

@MappedSuperclass
@Data@EqualsAndHashCode(callSuper=false)
public class BaseEntity implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * id生成策略UUID
	 */
	@Id@GeneratedValue(generator="system-uuid")
	@GenericGenerator(name="system-uuid",strategy="uuid")
	private String id;
	//所有实体编码
	@Column(name="code")
	private String code;
	//所有实体
	@Column(name="name")
	private String name;
	//排序码
	@Column(name="order_code")
	private Long orderCode;	
}
